package com.neuedu.controller.physician;

import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.neuedu.bean.Register;
import com.neuedu.bean.RestBean;
import com.neuedu.service.physician.PhysicianPatientService;

/**
 * 医生看诊：患者管理
 */
@RestController
public class PhysicianPatientController {
	@Autowired
	private PhysicianPatientService physicianPatientService;

	// 查询看诊完毕的人数（状态为3）
	@RequestMapping("getFinishPatientCount")
	public Integer getFinishPatientCount(Integer employeeId) {
		return physicianPatientService.getFinishPatientCount(employeeId);
	}

	// 取得费用查询的所有患者（状态：123），分页搜索
	@RequestMapping("getPatientQuery")
	public RestBean getPatientQuery(@RequestParam Map<String, Object> map) {
		return physicianPatientService.getPatientQuery(map);
	}

	// 查询正在排队的人数（状态为1）
	@RequestMapping("getWaitPatientCount")
	public Integer getWaitPatientCount(Integer employeeId) {
		return physicianPatientService.getWaitPatientCount(employeeId);
	}

	// 查询正在排队的人员信息
	@RequestMapping("getWaitPatient")
	public RestBean<List<Register>> getWaitPatient(Integer employeeId, String caseNumber, String realName, Integer nowPageNumber,
			Integer pageSize) {
		System.out.println("nowPageNumber="+nowPageNumber);
		return physicianPatientService.getWaitPatient(employeeId, caseNumber, realName, nowPageNumber, pageSize);
	}

	// 得到患者所有项目
	@RequestMapping("getPatientItemByPhysician")
	public RestBean getPatientItemByPhysician(Integer registerId) {
		return physicianPatientService.getPatientItemByItemtype(registerId, "所有");
	}

	// 得到患者所有检查项目
	@RequestMapping("getPatientItemByCheck")
	public RestBean getPatientItemByCheck(Integer registerId) {
		return physicianPatientService.getPatientItemByItemtype(registerId, "检查");
	}

	// 得到患者所有检验项目
	@RequestMapping("getPatientItemByInspection")
	public RestBean getPatientItemByInspection(Integer registerId) {
		return physicianPatientService.getPatientItemByItemtype(registerId, "检验");
	}

	// 得到患者所有药品项目
	@RequestMapping("getPatientItemByDrug")
	public RestBean getPatientItemByDrug(Integer registerId) {
		return physicianPatientService.getPatientItemByItemtype(registerId, "药品");
	}

	// 得到患者所有处置项目
	@RequestMapping("getPatientItemByDisposal")
	public RestBean getPatientItemByDisposal(Integer registerId) {
		return physicianPatientService.getPatientItemByItemtype(registerId, "处置");
	}
}
